package com.crape.account.dao.impl;

import com.crape.account.dao.IImageInfoDAO;
import com.crape.common.exceptions.DAOException;
import com.crape.common.ibatis.SqlMapClientDaoSupportEx;
import com.crape.common.model.ImageInfo;

public class ImageInfoDAOImpl extends SqlMapClientDaoSupportEx  implements IImageInfoDAO {

	@Override
	public void insertImageInfo(ImageInfo imageInfo) throws DAOException {
		if(imageInfo == null){
			return;
		}
		this.insert("insertImageInfo", imageInfo);
	}

	@Override
	public ImageInfo queryImageInfoById(Long id) throws DAOException {
		if(id == null){
			return null;
		}
		return (ImageInfo) this.queryObject("queryImageInfoById", id);
	}

	@Override
	public ImageInfo queryImageInfoByName(String name) throws DAOException {
		if(name == null){
			return null;
		}
		return (ImageInfo) this.queryObject("queryImageInfoByName", name);
	}
	
}
